﻿namespace CSharpCompiler
{
    using System;
    using System.IO;
    using System.Text;
    using UnityEngine;

    internal class UnityLogTextWriter : TextWriter
    {
        public override void Write(string value)
        {
            value = value.Replace(@"\", "/").Replace(Application.dataPath + "/", string.Empty);
            Debug.Log(value);
        }

        public override System.Text.Encoding Encoding
        {
            get
            {
                return System.Text.Encoding.ASCII;
            }
        }
    }
}

